% TEMPLATE FOR STANDARD QUIZ
% by laura
\documentclass[14pt,epsfig]{article}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in

\parindent=0in
\pagestyle{empty}

%testpoints.tex
\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in
\parindent=0in
\pagestyle{empty}

\newcounter{problemnum}
\renewcommand{\theproblemnum}{\arabic{problemnum}}
\newcounter{partnum}[problemnum]
\renewcommand{\thepartnum}{\alph{partnum}}
\newcounter{totalpoints}
\newcounter{curprobpts}	
\newcounter{totalparts}
\newcounter{pagepoints}
\newenvironment{problem}[1]{
\refstepcounter{problemnum}
\vspace{0.15in} \par
\setcounter{curprobpts}{#1} \setcounter{totalparts}{0}
{\Large \bf \theproblemnum. \normalsize ({\it \arabic{curprobpts} point\null\ifnum \value{curprobpts} = 1\else s\fi}\/)}
}{\ifnum \value{totalparts} = 0
	\addtocounter{totalpoints}{\value{curprobpts}}	% Add pts to total.
	\addtocounter{pagepoints}{\value{curprobpts}}
	\else \ifnum \value{totalparts} = \value{curprobpts}
	\else \typeout{}
	\typeout{!!!!!!!   POINT ACCOUNTING ERROR   !!!!!!!!}
	\typeout{PROBLEM [\theproblemnum] WAS ALLOCATED \arabic{curprobpts} POINTS,}
	\typeout{BUT CONTAINS PARTS TOTALLING \arabic{totalparts} POINTS!}
	\typeout{}
	\fi
\fi
}
\newcommand{\newpart}[1]
{
\refstepcounter{partnum}
\hspace{0.25in}	
\ifnum #1 > 0
	\makebox[0.5in][l]{{\bf \thepartnum.} {\bf ({\it #1 pt\ifnum #1 = 1\else s\fi\/}) \,\,}}
\else
	\makebox[0.25in][l]{({\bf \thepartnum})}
\fi
\hspace{0.1in}	
\addtocounter{totalparts}{#1}
\addtocounter{pagepoints}{#1}
\addtocounter{totalpoints}{#1}
}
\newcommand{\skipproblem}[1]{\addtocounter{problemnum}{#1}}

\newcommand{\showpoints}
{
\typeout{}  
\typeout{====> A TOTAL OF \arabic{totalpoints} POINTS WERE READ.}
\typeout{}
}
%%%%%end testpoints.tex
%\input{testpoints}

\begin{document}


%%%(change to appropriate class and semester)
MATH 2222H{\&}J Spring 2016

%%%(change to appropriate quiz type and date)
Quiz 7 \hspace{1.9in} SOLUTION 
\vspace{2pc}

%%%(modify rules, time, points as appropriate)
Show all work clearly and in order. Justify your answers algebraically whenever possible. Unjustified work may not receive full credit. \\
\vspace{2pc}

In \href{http://dualaud.net/teach/classes/2016/MATH-2222-HJ-Spring-2016-MissouriST/quizzes/quiz5%28solution%29-math%202222HJ-spring%202016-missourist.pdf}{Quiz~5} we modeled the following triangle:

		\begin{tikzpicture}
	\draw (-1,0) -- (0,3);
\draw[-{<[scale=2.5,length=2,width=3]},line width=0.4pt] (-1,0) to (-0.5,1.5);
\draw[-{>[scale=2.5,length=2,width=3]},line width=0.4pt] (-3,0) to (1,0);
\draw[-{>[scale=2.5,length=2,width=3]},line width=0.4pt] (3,0) to (0.5,2.5);
	\draw (0,3) -- (3,0);
	\draw[thick, <->] (-3,0) -- (4,0);
	\draw[thick,<->] (0,-1) -- (0,4);
	\draw[fill=black] (0,3) circle (2pt);
	\node at (0,3) [above right] {(0, $h$)};
	\draw[fill=black] (3,0) circle (2pt);
	\node at (3,0) [above right] {($b_2$,$0$)};
	\draw[fill=black] (-1,0) circle (2pt);
	\node at (-1,0) [above left] {($b_1$, $0$)};
	\node at (4,0) [below right] {$x$};
	\node at (0,4) [right] {$y$};
	\node at (1.5,1.9) [above right] {$y=
	\dfrac{-h}{b_2}x+h$};
	\node at (-0.5,1.5) [above left] {$y=\dfrac{-h}{b_1}x+h$};
\end{tikzpicture}\\

and computed its area using a double integral over its interior. In this quiz we will use Green's theorem to find an appropriate line integral to compute the area of the triangle. Recall that if $C$ is a positively oriented closed contour boundary of a region $R$ in the plane, then Green's theorem shows us that
\begin{equation}
\mathrm{Area}(R)=\displaystyle\iint_R 1 dA = -\oint_C y \mathrm{d}x.\label{areawithgreens}
\end{equation}
We decompose the triangle into three contours $C_1$ the left leg, $C_2$ the bottom leg, and $C_3$ the right leg. Consequently,
$$-\oint_C y \mathrm{d}x = - \left( \oint_{C_1} y \mathrm{d}x + \oint_{C_2} y \mathrm{d}x + \oint_{C_3} y \mathrm{d}x \right).$$
\begin{problem}{2} Find parametrizations $\vec{r}_1$ for $C_1$, $\vec{r}_2$ for $C_2$, and $\vec{r}_3$ for $C_3$. Make sure the orientation of the curve $C$ formed by $C_1,C_2,$ and $C_3$ has orientation that matches the figure above. \\
\end{problem}
\textit{Solution:} The curve $C_1$ is the line segment from $(0,h)$ to $(b_1,0)$, $C_2$ is the line segment from $(b_1,0)$ to $(b_2,0)$, and $C_3$ is the line segment from $(b_2,0)$ to $(0,h)$. Therefore we parametrize $C_1$ as
$$\left\{ \begin{array}{ll}
\vec{r}_1(t) = t <b_1,0>+(1-t)<0,h> = <tb_1, h-th> \\
0 \leq t \leq 1,
\end{array} \right.$$
we parametrize $C_2$ as
$$\left\{ \begin{array}{ll}
\vec{r}_2(t)=t<b_1,0> + (1-t)<b_2,0>=<tb_1-tb_2+1,0> \\
0 \leq t \leq 1,
\end{array} \right.$$
and we parametrize $C_3$ as 
$$\left\{ \begin{array}{ll}
\vec{r}_3(t) = t<0,h>+(1-t)<b_2,0> =<b_2-tb_2,th>\\
0 \leq t \leq 1.
\end{array} \right.$$


\begin{problem}{3} Use formula \eqref{areawithgreens} to compute the the area of the triangle using the line integral.
\end{problem} \\
\textit{Solution:} We compute using Green's theorem and the formula $b_2-b_1=b$,
$$\begin{array}{ll}
-\displaystyle\oint_C y \mathrm{d}x &= -\displaystyle\int_{C_1} y \mathrm{d}x-\displaystyle\int_{C_2} y \mathrm{d}x-\displaystyle\int_{C_3} y \mathrm{d}x \\
&= -\left[ \displaystyle\int_0^1 (h-th)b_1 \mathrm{d}t + \displaystyle\int_0^1 0 dt + \displaystyle\int_0^1 th(-b_2) dt \right] \\
&=- \left. b_1h \left(t-\dfrac{t^2}{2} \right) \right|_0^1 + b_2 h \left.\dfrac{t^2}{2} \right|_0^1 \\
&= -\dfrac{b_1h}{2}+\dfrac{b_2 h}{2} \\
&= \dfrac{(b_2-b_1)h}{2} \\
&= \dfrac{1}{2}bh,
\end{array}$$
as was to be shown.

\end{document}